package com.drg.center.entity.enums;

/**
 * 诊断类型枚举类
 *
 * @Author: zhangxilin
 * @Date: 2021/11/5
 */
public enum DiagnosisTypeEnum {

    chinese_medicine(1, "中医"),

    western_medicine(2, "西医");

    private Integer code;

    private String desc;


    public static DiagnosisTypeEnum getByCode(Integer code) {
        for (DiagnosisTypeEnum enums : DiagnosisTypeEnum.values()) {
            if (enums.getCode().equals(code)) {
                return enums;
            }
        }
        return null;
    }

    DiagnosisTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
